/**
 * Created by koudaiwang on 2017/6/29.
 */


var md5 = require('../tool/md5');

module.exports = {

    md5s: function md5s(txt) {
        var salt = 'AFER&DCN123';
        var entxt = txt + salt;
        return md5.hex_md5(entxt).toLowerCase();
    },
    md5token: function (txt) {
        console.log(new Date().getTime().toString());
        var salt = 'AFER&DCN123TOKEN' + new Date().getTime().toString();
        var entxt = txt + salt;
        console.log(md5.hex_md5(entxt).toLowerCase());
        return md5.hex_md5(entxt).toLowerCase();
    },
    md5: function (txt) {
        return md5.hex_md5(txt).toLowerCase();
    }
};